<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>无线蓝牙耳机 - 社交商城</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: #f5f5f5;
            color: #333;
            padding-bottom: 65px;
        }
        
        /* 顶部导航 */
        .top-nav {
            background-color: white;
            padding: 12px 16px;
            border-bottom: 1px solid #eee;
            position: sticky;
            top: 0;
            z-index: 100;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .nav-back, .nav-share {
            color: #333;
            text-decoration: none;
            font-size: 20px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .nav-title {
            font-size: 17px;
            font-weight: 500;
            flex: 1;
            text-align: center;
        }
        
        /* 商品图片轮播 */
        .product-images {
            position: relative;
            background-color: #fff;
        }
        
        .image-slider {
            display: flex;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            scrollbar-width: none;
        }
        
        .image-slider::-webkit-scrollbar {
            display: none;
        }
        
        .slider-image {
            width: 100%;
            flex-shrink: 0;
            scroll-snap-align: start;
        }
        
        .slider-image img {
            width: 100%;
            display: block;
        }
        
        .image-count {
            position: absolute;
            bottom: 10px;
            right: 10px;
            background-color: rgba(0,0,0,0.5);
            color: white;
            font-size: 12px;
            padding: 3px 8px;
            border-radius: 12px;
        }
        
        /* 商品信息 */
        .product-info {
            background-color: white;
            padding: 16px;
            border-bottom: 1px solid #eee;
        }
        
        .product-title {
            font-size: 18px;
            font-weight: 500;
            margin-bottom: 10px;
            line-height: 1.4;
        }
        
        .product-price {
            margin-bottom: 10px;
        }
        
        .current-price {
            font-size: 22px;
            font-weight: 600;
            color: #ff4d4f;
        }
        
        .original-price {
            font-size: 14px;
            color: #999;
            text-decoration: line-through;
            margin-left: 8px;
        }
        
        .price-tag {
            display: inline-block;
            background-color: #fff1f0;
            color: #ff4d4f;
            font-size: 12px;
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: 8px;
        }
        
        .product-meta {
            display: flex;
            justify-content: space-between;
            color: #666;
            font-size: 14px;
            padding: 10px 0;
            border-top: 1px solid #eee;
            border-bottom: 1px solid #eee;
            margin-bottom: 10px;
        }
        
        .meta-item {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        
        .meta-value {
            font-weight: 500;
            margin-bottom: 4px;
        }
        
        .meta-label {
            font-size: 12px;
            color: #999;
        }
        
        .product-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 10px;
        }
        
        .product-tag {
            background-color: #f5f5f5;
            color: #666;
            font-size: 13px;
            padding: 4px 10px;
            border-radius: 16px;
        }
        
        /* 店铺信息 */
        .shop-info {
            display: flex;
            align-items: center;
            padding: 10px 16px;
            background-color: white;
            border-bottom: 1px solid #eee;
            text-decoration: none;
            color: #333;
        }
        
        .shop-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: #f5f5f5;
            overflow: hidden;
            margin-right: 10px;
            flex-shrink: 0;
        }
        
        .shop-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .shop-details {
            flex: 1;
        }
        
        .shop-name {
            font-weight: 500;
            margin-bottom: 2px;
        }
        
        .shop-rating {
            font-size: 12px;
            color: #999;
        }
        
        .follow-btn {
            background-color: #ff4d4f;
            color: white;
            border: none;
            border-radius: 16px;
            padding: 5px 12px;
            font-size: 13px;
            flex-shrink: 0;
        }
        
        .follow-btn.following {
            background-color: #f5f5f5;
            color: #666;
        }
        
        /* 商品详情 */
        .product-details {
            margin-top: 10px;
            background-color: white;
            padding: 16px;
        }
        
        .section-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid #eee;
        }
        
        .detail-content img {
            width: 100%;
            display: block;
            margin-bottom: 10px;
        }
        
        .detail-content p {
            margin-bottom: 10px;
            line-height: 1.6;
        }
        
        /* 规格选择 */
        .specifications {
            margin-top: 10px;
            background-color: white;
            padding: 16px;
        }
        
        .spec-group {
            margin-bottom: 16px;
        }
        
        .spec-title {
            font-size: 14px;
            color: #666;
            margin-bottom: 8px;
        }
        
        .spec-options {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .spec-option {
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 8px 16px;
            font-size: 14px;
            cursor: pointer;
        }
        
        .spec-option.selected {
            border-color: #ff4d4f;
            color: #ff4d4f;
            background-color: #fff1f0;
        }
        
        /* 操作按钮区 */
        .action-buttons {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: white;
            border-top: 1px solid #eee;
            display: flex;
            height: 55px;
            z-index: 100;
        }
        
        .action-btn {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: #666;
            text-decoration: none;
            font-size: 10px;
        }
        
        .action-btn i {
            font-size: 20px;
            margin-bottom: 3px;
        }
        
        .action-btn.primary {
            flex: 2;
            background-color: #fa8c16;
            color: white;
            font-size: 15px;
            flex-direction: row;
        }
        
        .action-btn.primary.main {
            background-color: #ff4d4f;
        }
        
        /* 留言区 */
        .comments-section {
            margin-top: 10px;
            background-color: white;
            padding: 16px;
        }
        
        .comments-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        
        .comments-count {
            font-size: 16px;
            font-weight: 600;
        }
        
        .comments-filter {
            color: #666;
            font-size: 14px;
            display: flex;
            align-items: center;
        }
        
        .comments-filter i {
            margin-left: 5px;
            font-size: 12px;
        }
        
        .comment-item {
            padding: 12px 0;
            border-bottom: 1px solid #eee;
        }
        
        .comment-header {
            display: flex;
            margin-bottom: 8px;
        }
        
        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background-color: #f5f5f5;
            overflow: hidden;
            margin-right: 10px;
        }
        
        .user-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .user-info {
            flex: 1;
        }
        
        .user-name {
            font-weight: 500;
            font-size: 14px;
            margin-bottom: 2px;
        }
        
        .comment-time {
            font-size: 12px;
            color: #999;
        }
        
        .comment-content {
            font-size: 14px;
            margin-bottom: 8px;
            line-height: 1.5;
        }
        
        .comment-images {
            display: flex;
            gap: 8px;
            margin-bottom: 8px;
        }
        
        .comment-image {
            width: 80px;
            height: 80px;
            border-radius: 4px;
            overflow: hidden;
        }
        
        .comment-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .comment-actions {
            display: flex;
            align-items: center;
            color: #999;
            font-size: 13px;
        }
        
        .comment-action {
            display: flex;
            align-items: center;
            margin-right: 16px;
            cursor: pointer;
        }
        
        .comment-action i {
            margin-right: 4px;
            font-size: 14px;
        }
        
        .comment-action.liked {
            color: #ff4d4f;
        }
        
        /* 回复区 */
        .replies {
            margin-left: 46px;
            margin-top: 8px;
            background-color: #f5f5f5;
            border-radius: 8px;
            padding: 8px;
        }
        
        .reply-item {
            margin-bottom: 8px;
            font-size: 13px;
        }
        
        .reply-item:last-child {
            margin-bottom: 0;
        }
        
        .reply-content {
            line-height: 1.5;
        }
        
        .reply-user {
            font-weight: 500;
            color: #333;
        }
        
        .reply-actions {
            display: flex;
            margin-top: 4px;
            color: #999;
            font-size: 12px;
        }
        
        /* 留言输入框 */
        .comment-input-section {
            padding: 10px 16px;
            background-color: white;
            position: relative;
            margin-top: 10px;
        }
        
        .comment-input-container {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .my-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background-color: #f5f5f5;
            overflow: hidden;
            flex-shrink: 0;
        }
        
        .my-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .comment-input {
            flex: 1;
            border: 1px solid #eee;
            border-radius: 20px;
            padding: 8px 16px;
            font-size: 14px;
            background-color: #f5f5f5;
        }
        
        .send-btn {
            color: #ff4d4f;
            font-size: 15px;
            border: none;
            background: none;
            flex-shrink: 0;
        }
        
        /* 加载更多 */
        .load-more {
            padding: 15px;
            text-align: center;
        }
        
        .load-more-btn {
            background-color: white;
            border: 1px solid #eee;
            border-radius: 6px;
            padding: 8px 16px;
            font-size: 14px;
            color: #666;
            cursor: pointer;
        }
        
        /* 商品导航 */
        .product-tabs {
            display: flex;
            background-color: white;
            border-bottom: 1px solid #eee;
            position: sticky;
            top: 54px;
            z-index: 99;
        }
        
        .product-tab {
            flex: 1;
            text-align: center;
            padding: 12px 0;
            font-size: 15px;
            color: #666;
            text-decoration: none;
            position: relative;
        }
        
        .product-tab.active {
            color: #ff4d4f;
        }
        
        .product-tab.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 30px;
            height: 3px;
            background-color: #ff4d4f;
            border-radius: 3px;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <a href="#" class="nav-back">
            <i class="fas fa-arrow-left"></i>
        </a>
        <div class="nav-title">商品详情</div>
        <a href="#" class="nav-share">
            <i class="fas fa-share-alt"></i>
        </a>
    </div>
    
    <!-- 商品导航标签 -->
    <div class="product-tabs">
        <a href="#info" class="product-tab active">详情</a>
        <a href="#comments" class="product-tab">评价 (128)</a>
        <a href="#related" class="product-tab">相关推荐</a>
    </div>
    
    <!-- 商品图片轮播 -->
    <div class="product-images">
        <div class="image-slider">
            <div class="slider-image">
                <img src="https://picsum.photos/id/26/800/800" alt="无线蓝牙耳机图片1">
            </div>
            <div class="slider-image">
                <img src="https://picsum.photos/id/96/800/800" alt="无线蓝牙耳机图片2">
            </div>
            <div class="slider-image">
                <img src="https://picsum.photos/id/21/800/800" alt="无线蓝牙耳机图片3">
            </div>
            <div class="slider-image">
                <img src="https://picsum.photos/id/22/800/800" alt="无线蓝牙耳机图片4">
            </div>
        </div>
        <div class="image-count">1/4</div>
    </div>
    
    <!-- 商品信息 -->
    <div class="product-info" id="info">
        <h1 class="product-title">无线蓝牙耳机 主动降噪 长续航 高清通话 运动防水 入耳检测 触控操作</h1>
        
        <div class="product-price">
            <span class="current-price">¥299.00</span>
            <span class="original-price">¥399.00</span>
            <span class="price-tag">限时折扣</span>
        </div>
        
        <div class="product-meta">
            <div class="meta-item">
                <span class="meta-value">4.9</span>
                <span class="meta-label">好评</span>
            </div>
            <div class="meta-item">
                <span class="meta-value">1256</span>
                <span class="meta-label">已售</span>
            </div>
            <div class="meta-item">
                <span class="meta-value">238</span>
                <span class="meta-label">评价</span>
            </div>
            <div class="meta-item">
                <span class="meta-value">数码生活馆</span>
                <span class="meta-label">店铺</span>
            </div>
        </div>
        
        <div class="product-tags">
            <span class="product-tag">电子数码</span>
            <span class="product-tag">无线耳机</span>
            <span class="product-tag">主动降噪</span>
            <span class="product-tag">长续航</span>
            <span class="product-tag">官方正品</span>
            <span class="product-tag">包邮</span>
        </div>
    </div>
    
    <!-- 店铺信息 -->
    <a href="#" class="shop-info">
        <div class="shop-avatar">
            <img src="https://picsum.photos/id/64/100/100" alt="店铺头像">
        </div>
        <div class="shop-details">
            <div class="shop-name">数码生活馆</div>
            <div class="shop-rating">
                <i class="fas fa-star" style="color: #faad14; font-size: 12px;"></i>
                <span>4.8 (12.5万粉丝)</span>
            </div>
        </div>
        <button class="follow-btn">关注</button>
    </a>
    
    <!-- 规格选择 -->
    <div class="specifications">
        <div class="section-title">选择规格</div>
        
        <div class="spec-group">
            <div class="spec-title">颜色</div>
            <div class="spec-options">
                <div class="spec-option selected">黑色</div>
                <div class="spec-option">白色</div>
                <div class="spec-option">蓝色</div>
                <div class="spec-option">红色</div>
            </div>
        </div>
        
        <div class="spec-group">
            <div class="spec-title">套餐</div>
            <div class="spec-options">
                <div class="spec-option selected">标准版</div>
                <div class="spec-option">标准版 + 充电仓</div>
                <div class="spec-option">豪华版 + 一年质保</div>
            </div>
        </div>
        
        <div class="spec-group">
            <div class="spec-title">数量</div>
            <div class="spec-options">
                <div class="spec-option selected">1件</div>
                <div class="spec-option">2件</div>
                <div class="spec-option">3件</div>
                <div class="spec-option">5件</div>
            </div>
        </div>
    </div>
    
    <!-- 商品详情 -->
    <div class="product-details">
        <div class="section-title">商品详情</div>
        <div class="detail-content">
            <p>【主动降噪技术】采用新一代降噪芯片，有效隔绝环境噪音，让您专注于音乐世界。</p>
            <img src="https://picsum.photos/id/26/800/500" alt="产品细节图1">
            <p>【长效续航】单次充电可使用8小时，搭配充电仓总续航长达32小时，满足全天使用需求。</p>
            <img src="https://picsum.photos/id/96/800/500" alt="产品细节图2">
            <p>【高清通话】内置6麦克风阵列，采用波束成形技术，有效降低环境噪音，通话清晰如新。</p>
            <p>【IPX7防水】专业防水设计，运动出汗、雨天出行都不怕，使用更安心。</p>
            <img src="https://picsum.photos/id/21/800/500" alt="产品细节图3">
            <p>【智能触控】轻触耳机即可实现播放/暂停、切歌、接打电话等操作，简单便捷。</p>
            <p>【快速配对】开盖即连，支持自动回连，使用体验更流畅。</p>
        </div>
    </div>
    
    <!-- 留言评论区 -->
    <div class="comments-section" id="comments">
        <div class="comments-header">
            <div class="comments-count">用户评价 (238)</div>
            <div class="comments-filter">
                最新 <i class="fas fa-chevron-down"></i>
            </div>
        </div>
        
        <!-- 评论1 -->
        <div class="comment-item">
            <div class="comment-header">
                <div class="user-avatar">
                    <img src="https://picsum.photos/id/64/100/100" alt="用户头像">
                </div>
                <div class="user-info">
                    <div class="user-name">音乐爱好者</div>
                    <div class="comment-time">2023-06-15 14:30</div>
                </div>
            </div>
            <div class="comment-content">
                音质非常好，降噪效果超出预期，在地铁上使用几乎能隔绝大部分噪音。续航也不错，充一次电可以用很久，值得购买！
            </div>
            <div class="comment-images">
                <div class="comment-image">
                    <img src="https://picsum.photos/id/26/200/200" alt="评论图片1">
                </div>
                <div class="comment-image">
                    <img src="https://picsum.photos/id/96/200/200" alt="评论图片2">
                </div>
            </div>
            <div class="comment-actions">
                <div class="comment-action">
                    <i class="far fa-thumbs-up"></i> 有用 (32)
                </div>
                <div class="comment-action">
                    <i class="far fa-comment"></i> 回复
                </div>
            </div>
            
            <!-- 回复 -->
            <div class="replies">
                <div class="reply-item">
                    <div class="reply-content">
                        <span class="reply-user">数码生活馆</span>：感谢您的好评，我们会继续努力提供更好的产品和服务！
                    </div>
                    <div class="reply-actions">
                        <div class="comment-action">
                            <i class="far fa-thumbs-up"></i> 有用 (5)
                        </div>
                        <div class="comment-action">
                            <i class="far fa-comment"></i> 回复
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 评论2 -->
        <div class="comment-item">
            <div class="comment-header">
                <div class="user-avatar">
                    <img src="https://picsum.photos/id/65/100/100" alt="用户头像">
                </div>
                <div class="user-info">
                    <div class="user-name">运动达人</div>
                    <div class="comment-time">2023-06-10 09:15</div>
                </div>
            </div>
            <div class="comment-content">
                戴着跑步很稳，不会掉，防水效果也很好，出汗再多也不影响。音质在运动耳机里算很不错的了，性价比很高。
            </div>
            <div class="comment-actions">
                <div class="comment-action liked">
                    <i class="fas fa-thumbs-up"></i> 有用 (18)
                </div>
                <div class="comment-action">
                    <i class="far fa-comment"></i> 回复
                </div>
            </div>
        </div>
        
        <!-- 评论3 -->
        <div class="comment-item">
            <div class="comment-header">
                <div class="user-avatar">
                    <img src="https://picsum.photos/id/66/100/100" alt="用户头像">
                </div>
                <div class="user-info">
                    <div class="user-name">上班族小李</div>
                    <div class="comment-time">2023-06-05 16:45</div>
                </div>
            </div>
            <div class="comment-content">
                通话质量很好，对方说听得很清楚，即使在嘈杂的办公室也没问题。触控操作很灵敏，整体很满意。
            </div>
            <div class="comment-actions">
                <div class="comment-action">
                    <i class="far fa-thumbs-up"></i> 有用 (12)
                </div>
                <div class="comment-action">
                    <i class="far fa-comment"></i> 回复
                </div>
            </div>
        </div>
        
        <!-- 加载更多评论 -->
        <div class="load-more">
            <button class="load-more-btn">查看更多评论</button>
        </div>
    </div>
    
    <!-- 留言输入框 -->
    <div class="comment-input-section">
        <div class="comment-input-container">
            <div class="my-avatar">
                <img src="https://picsum.photos/id/67/100/100" alt="我的头像">
            </div>
            <input type="text" class="comment-input" placeholder="分享你的使用体验...">
            <button class="send-btn">发送</button>
        </div>
    </div>
    
    <!-- 操作按钮区 -->
    <div class="action-buttons">
        <a href="#" class="action-btn">
            <i class="far fa-heart"></i>
            <span>收藏</span>
        </a>
        <a href="#" class="action-btn">
            <i class="far fa-share-square"></i>
            <span>分享</span>
        </a>
        <a href="#" class="action-btn">
            <i class="far fa-comment-dots"></i>
            <span>咨询</span>
        </a>
        <a href="#" class="action-btn primary">
            <i class="fas fa-shopping-cart"></i>
            <span>加入购物车</span>
        </a>
        <a href="#" class="action-btn primary main">
            <span>立即购买</span>
        </a>
    </div>

    <!-- Bootstrap 5 JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 图片轮播计数更新
            const imageSlider = document.querySelector('.image-slider');
            const imageCount = document.querySelector('.image-count');
            const sliderImages = document.querySelectorAll('.slider-image');
            
            imageSlider.addEventListener('scroll', function() {
                // 计算当前显示的图片索引
                const scrollPosition = this.scrollLeft;
                const slideWidth = sliderImages[0].offsetWidth;
                const currentIndex = Math.round(scrollPosition / slideWidth) + 1;
                
                // 更新计数显示
                imageCount.textContent = `${currentIndex}/${sliderImages.length}`;
            });
            
            // 规格选择
            const specOptions = document.querySelectorAll('.spec-option');
            specOptions.forEach(option => {
                option.addEventListener('click', function() {
                    // 只在同一规格组内切换选中状态
                    const specGroup = this.closest('.spec-group');
                    specGroup.querySelectorAll('.spec-option').forEach(opt => {
                        opt.classList.remove('selected');
                    });
                    this.classList.add('selected');
                });
            });
            
            // 导航标签切换
            const productTabs = document.querySelectorAll('.product-tab');
            productTabs.forEach(tab => {
                tab.addEventListener('click', function(e) {
                    e.preventDefault();
                    
                    // 切换选中状态
                    productTabs.forEach(t => t.classList.remove('active'));
                    this.classList.add('active');
                    
                    // 滚动到对应区域
                    const targetId = this.getAttribute('href');
                    if (targetId) {
                        const targetElement = document.querySelector(targetId);
                        if (targetElement) {
                            window.scrollTo({
                                top: targetElement.offsetTop - 110, // 减去导航高度
                                behavior: 'smooth'
                            });
                        }
                    }
                });
            });
            
            // 评论点赞功能
            const likeButtons = document.querySelectorAll('.comment-action .fa-thumbs-up');
            likeButtons.forEach(button => {
                button.parentElement.addEventListener('click', function() {
                    this.classList.toggle('liked');
                    const icon = this.querySelector('i');
                    
                    if (this.classList.contains('liked')) {
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        
                        // 更新点赞数
                        const countText = this.textContent.trim();
                        const count = parseInt(countText.match(/\d+/)[0]);
                        this.innerHTML = `<i class="fas fa-thumbs-up"></i> 有用 (${count + 1})`;
                    } else {
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        
                        // 更新点赞数
                        const countText = this.textContent.trim();
                        const count = parseInt(countText.match(/\d+/)[0]);
                        this.innerHTML = `<i class="far fa-thumbs-up"></i> 有用 (${count - 1})`;
                    }
                });
            });
            
            // 关注店铺按钮
            const followBtn = document.querySelector('.follow-btn');
            followBtn.addEventListener('click', function() {
                if (this.classList.contains('following')) {
                    this.classList.remove('following');
                    this.textContent = '关注';
                } else {
                    this.classList.add('following');
                    this.textContent = '已关注';
                }
            });
            
            // 收藏按钮
            const favoriteBtn = document.querySelector('.action-btn .fa-heart').parentElement;
            favoriteBtn.addEventListener('click', function(e) {
                e.preventDefault();
                const icon = this.querySelector('i');
                icon.classList.toggle('far');
                icon.classList.toggle('fas');
                icon.classList.toggle('text-danger');
            });
        });
    </script>
</body>
</html>

